package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class CompanyFavorite implements Serializable {

	private static final long serialVersionUID = -5961147940046638905L;

	//fields
	private java.lang.Integer id;
	private java.lang.Integer companyId;
	private java.lang.String type;
	private java.lang.String fid;
	private java.sql.Timestamp createTime;

	//default constructor
	public CompanyFavorite() {
	}

	//getter
	public java.lang.Integer getId() {
		return id;
	}
	public java.lang.Integer getCompanyId() {
		return companyId;
	}
	public java.lang.String getType() {
		return type;
	}
	public java.lang.String getFid() {
		return fid;
	}
	public java.sql.Timestamp getCreateTime() {
		return createTime;
	}

	//setter
	public void setId(java.lang.Integer id) {
		this.id = id;
	}
	public void setCompanyId(java.lang.Integer companyId) {
		this.companyId = companyId;
	}
	public void setType(java.lang.String type) {
		this.type = type;
	}
	public void setFid(java.lang.String fid) {
		this.fid = fid;
	}
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof CompanyFavorite))
			return false;

		final CompanyFavorite favorite = (CompanyFavorite)other;
		if (!this.id.equals(favorite.getId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(id).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("CompanyFavorite[")
			.append("id=").append(id).append(", ")
			.append("companyId=").append(companyId).append(", ")
			.append("type=").append(type).append(", ")
			.append("fid=").append(fid).append(", ")
			.append("createTime=").append(createTime).append("]").toString();
	}
	
}